class UserClient {
    getUser=()=> {
        if (!window['userId']) {
            return null;
        }
        
        return {
            username: window['userName'],
            id: window['userId']
        }
    }

    setUser = (user) => {
        window['userName'] = user.username;
        window['userId'] = user.id;
    } 
}

const userClient = new UserClient();
export default userClient;